<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../dist/calendar.js"></script>
    <style>
        #date{
            width: 1000px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    
    
    <div id="date">

    </div>
    

    <script>
        
        calendar('#date', {
            notepadNormalText: '未设置',
            notepadColor: 'red',
            notepadFontSize: '12px',
            borderWidth: '2px',
            borderColor: 'red',
            titleWeekFontSize: '20px',
            titleWeekFontColor: 'red',
            notepadKeyConfig: {
                price: '单价',
                number: '数量',
                status: '接待' // 固定参数 代表单选状态
            },
            notepadConfig: [
                {
                    time: '2018-03-01',
                    notepadText: {
                        price: '1800.00',
                        number: '1',
                        status: '1' // 1为真 -1为假
                    }
                },
                {
                    time: '2018-03-02',
                    notepadText: {
                        price: '1800.00',
                        number: '1aa',
                        status: '-1' // 1为真 -1为假
                    }
                },
            ],
            batchDate: ['2018-02-01', '2018-02-31'],
            dateNotepadChange: function(day, data) {
                // console.log(day)
                console.log('asdas',data)
                // console.log(this.notepadConfigUpdata = [
                //     {
                //         time: '2018-03-02',
                //         notepadText: {
                //             price: '1800.00',
                //             number: 'qweqwe'
                //         }
                //     }
                // ])

            },
            deleteCallBack: function (day, data) {
                console.log(day)
                console.log(data)
            },
            nextBtnClick: function() {
                this.notepadConfigUpdata = [
                    {
                        time: '2018-04-02',
                        notepadText: {
                            price: '1800.00',
                            number: '1aa'
                        }
                    }
                ]
            },
            prevBtnClick: function() {
                this.notepadConfigUpdata = [
                    {
                        time: '2018-03-02',
                        notepadText: {
                            price: '180.00',
                            number: '1'
                        }
                    }
                ]
            },
            toogleBtnClick: function (data) {
                console.log("ssaas",data)
            }
        })

    </script>

</body>
</html>